<mat-card class="material-card-sm">
  <form role="form" novalidate [formGroup]="imageAlbumForm" (ngSubmit)="saveAlbum()">
    <div class="mb-3">
      <mat-form-field class="material-input-full">
        <input matInput placeholder="Album Name" formControlName="albumName">
        <mat-error>
          <control-messages [isSubmitted]="isSubmitted" [control]="imageAlbumForm.controls['albumName']"></control-messages>
        </mat-error>
      </mat-form-field>
    </div>

    <div class="mb-3">
      <mat-form-field class="material-input-full">
        <textarea matInput placeholder="Album Description" formControlName="albumDescription"></textarea>
        <mat-error>
          <control-messages [isSubmitted]="isSubmitted" [control]="imageAlbumForm.controls['albumDescription']"></control-messages>
        </mat-error>
      </mat-form-field>
    </div>

    <div class="mb-3">
      <mat-checkbox formControlName="active">
        Active
      </mat-checkbox>
    </div>

    <div class="mb-3">
      <button mat-raised-button color="primary" type="submit">
        <i class="fas fa-save mr-2"></i>Save</button>
      <button mat-raised-button color="warn" type="button" (click)="triggerCancelForm()">
        <i class="fa fa-times mr-2"></i>Cancel</button>
    </div>
  </form>
</mat-card>
